#include<stdio.h>

void transmit(const char *dest , const char *src , const char *crc)
{
    FILE * fp_dest = fopen(dest , "w+");
    FILE * fp_src = fopen(src , "r");
    FILE * fp_crc = fopen(crc , "a+");
    char ch;
    for (int i = 0; EOF != (ch = fgetc(fp_src)); i++)
    {
        fputc(ch , fp_dest);
    }

    char sh = 0;
    for (int i = 0; EOF!=(sh = fgetc(fp_crc)); i++)
    {
        fputc(sh , fp_dest);
    }
    fclose(fp_dest);
    fclose(fp_src);
    fclose(fp_crc);


}


int main(int argc, char const *argv[])
{
    if (4 == argc)
    {
        printf("%s %s %s\n" , argv[1],argv[2],argv[3]);
        transmit(argv[1] , argv[2] , argv[3]);
    }
    else
    {
        printf("请按照标准格式输入 %s argc argv\n", argv[0]);
    }
    
    return 0;
}



